package com.curso.constants;


import android.view.Gravity;
import android.view.View;
import android.widget.TextView;

public class Errors {

	public static enum REGISTER_ERROR_TYPE {USERNAME_NOT_VALID,USERNAME_USED,PASSWORD_SHORT, PASSWORD_NOT_MATCH, EMAIL_USED, EMAIL_NOT_VALID, EMAIL_NOT_MATCH};
	public static TextView tv;
	public static void msgError(TextView tv,String str){
		tv.setText(str);
		tv.setVisibility(View.VISIBLE);
	}

	public static void setErrorTvNoInternet(TextView tev){
		tv = tev;
	}
	
	public static void showMsgNoInternet(){
		tv.setVisibility(View.VISIBLE);
	    tv.setGravity(Gravity.BOTTOM|Gravity.CENTER);
	    tv.requestFocus();
	}
	public static void hideMsgNoInternet(){
		tv.setVisibility(View.GONE);
	}
}
